package com.zhang.modules.mianShi.entity.cmd.equipment;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhang.common.jpa.entity.AddCmd;
import com.zhang.modules.mianShi.entity.Equipment;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.Instant;
import java.util.Date;

/**
 * A DTO for the {@link Equipment} entity
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EquipmentAddCmd implements Serializable , AddCmd {
    @Size(max = 255)
    @NotBlank(message = "设备编码不能为空")
    @ApiModelProperty("设备编码")
    private String equipmentCode;

    @Size(max = 255)
    @NotBlank(message = "设备名称不能为空")
    @ApiModelProperty("设备名称")
    private String equipmentName;

    @NotNull(message = "是否主设备不能为空")
    @ApiModelProperty("是否主设备")
    private Boolean isDefault = false;

    @Size(max = 255)
    @NotBlank(message = "主设备编码不能为空")
    @ApiModelProperty("主设备编码")
    private String masterCode;

    @Size(max = 255)
    @NotBlank(message = "所属系统id不能为空")
    @ApiModelProperty("所属系统id")
    private String systemId;

    @Size(max = 255)
    @NotBlank(message = "设备分类不能为空")
    @ApiModelProperty("设备分类")
    private String equipmentCategory;

    @Size(max = 255)
    @NotBlank(message = "出厂编号不能为空")
    @ApiModelProperty("出厂编号")
    private String equipmentModel;

    @Size(max = 255)
    @NotBlank(message = "生产厂家不能为空")
    @ApiModelProperty("生产厂家")
    private String manufacturer;

    @Size(max = 255)
    @NotBlank(message = "出厂编号不能为空")
    @ApiModelProperty("出厂编号")
    private String sn;

    @NotNull(message = "出厂日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("出厂日期")
    private Date pd;

    @Size(max = 255)
    @NotBlank(message = "调试单位不能为空")
    @ApiModelProperty("调试单位")
    private String debugUnits;

    @Size(max = 255)
    @NotBlank(message = "安装数量不能为空")
    @ApiModelProperty("安装数量")
    private String installNum;

    @Size(max = 255)
    @NotBlank(message = "安装位置不能为空")
    @ApiModelProperty("安装位置")
    private String installPos;

    @NotNull(message = "搬运日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("搬运日期")
    private Date removeDate;

    @Size(max = 255)
    @NotBlank(message = "设备评级不能为空")
    @ApiModelProperty("设备评级")
    private String equipmentRating;

    @Size(max = 255)
    @NotBlank(message = "设备状态不能为空")
    @ApiModelProperty("设备状态")
    private String equipmentStatus;
}